

################################################################################

 SVN_VERSION=$(shell svnversion -c |sed 's/^.*://' |sed 's/[A-Z]*M//') 
 CURTDATE=$(shell svn info | awk 'NR==12' |awk '{print $$4}') 
 CURTTIME=$(shell svn info | awk 'NR==12' |awk '{print $$5}') 

 CURR_MODULE_MAIN_DIR = $(CURDIR)
 export CURR_MODULE_MAIN_DIR
 
 #DSP_KERNELDIR = $(DSP_KERNELDIR_EX)
 DSP_KERNELDIR = /home/sgks/buildroot/output/build/linux-custom
 export DSP_KERNELDIR 
 
 DSP_TARGET_DIR = $(CURR_MODULE_MAIN_DIR)/OutFile
 export DSP_TARGET_DIR  


  DIRECTORIES += mdi

  SUBDIR = .
  
################################################################################
# define user targets
################################################################################

default: build install

clean: $(DIRECTORIES:%=subdir-clean-%)

build: $(DIRECTORIES:%=subdir-build-%)


install:


depend: 


all: clean install

subdir-build-%:
	@echo '/* This file is auto generated */ \n#define SVNREVISION "$(SVN_VERSION)"\n#define TIMESTAMP "$(CURTDATE)$(CURTTIME)" ' > mdi/mdi_version.h
	@$(MAKE) -C $(@:subdir-build-%=%)

subdir-clean-%:
	@$(MAKE) -C $(@:subdir-clean-%=%) clean
